package thread.java20221219;

public class Demo19 {
    public static void main(String[] args) throws InterruptedException {
        Thread t1 = new Thread(){
            @Override
            public void run() {
                for (int i = 0; i < 100; i++) {

                }
                System.out.println("线程执行结束");

            }
        };

        System.out.println("start 方法之前:" + t1.getState());
        t1.start();
        System.out.println("start方法之后:"+ t1.getState());
        Thread.sleep(1000);
        System.out.println(t1.getState());
    }
}
